<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>点击隐藏</title>
	</head>
	<body>
		<button>点击隐藏文本</button>
		<div>text</div>

		<script>
			const btn = document.querySelector('button')
			const div = document.querySelector('div')
			btn.addEventListener('click', function () {
				div.hidden = true
			})
		</script>
	</body>
</html>
